﻿package  
{
	
	/**
	* ...
	* @author DefaultUser (Tools -> Custom Arguments...)
	*/
	import ui.HUD;
	public class Water extends PickUp
	{
		
		public function Water(X:Number,Y:Number, animation:AnimatedSprite) 
		{
			super(X, Y);
			var waterDrink:Animation = new Animation(11);
			var water:Animation = new Animation(1);
				
				
			water.FramesPerSecond = 1;
			waterDrink.FramesPerSecond = 30;
				
			this.scaleX = 0.40;
			this.scaleY = this.scaleX;
			this._animation = animation;
			
			
			
			

			this._animation.Animations["water"] = water;
			this._animation.Animations["water_drink"] = waterDrink;
			this._animation.Texture = 'pickup_spritesheet';
			this._animation.CurrentAnimation = "water";
			this.addChild(_animation);
			
			
		}
		public override function dispose():void
		{
			World.waterCount --;
			Main.hud.time += 5;
			Main.hud.popup("+5 secs");
			this.scaleX = 1;
			this.scaleY = this.scaleX;
			this._animation.CurrentAnimation = "water_drink";
			super.dispose();
			Main.sound.play("water_drink");
		}	
		
	}
	
}